package com.imufe.chemicalenterprisedangerwarning.service.impl;

import com.imufe.chemicalenterprisedangerwarning.entity.po.UserSafetySupervisionBureauPO;
import com.imufe.chemicalenterprisedangerwarning.entity.vo.SafetySupervisionBureauVO;
import com.imufe.chemicalenterprisedangerwarning.mapper.UserSafetySupervisionBureauMapper;
import com.imufe.chemicalenterprisedangerwarning.service.SafetySupervisionBureauService;
import com.imufe.chemicalenterprisedangerwarning.service.UserSafetySupervisionBureauService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.java.Log;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 安监局用户表 用户辅助表 服务实现类
 * </p>
 *
 * @author BaiBan
 * @since 2022-10-11
 */
@Log4j2
@Service
public class UserSafetySupervisionBureauServiceImpl extends ServiceImpl<UserSafetySupervisionBureauMapper, UserSafetySupervisionBureauPO> implements UserSafetySupervisionBureauService {

    @Autowired
    UserSafetySupervisionBureauMapper mapper;

    @Autowired
    SafetySupervisionBureauService safetySupervisionBureauService;

    @Override
    public SafetySupervisionBureauVO getSafetySupervisionBureau(Long userId) {

        UserSafetySupervisionBureauPO po = mapper.selectById(userId);
        log.info(po);
        return safetySupervisionBureauService.basic(po.getSafetySupervisionBureauId());
    }
}
